<script setup lang="ts">
    import {ref,reactive} from 'vue'
    import mitter from '@/util/mitter'

    let bao2 = ref()
    //绑定一个事件
    mitter.on('test',(v)=>{
        bao2.value = v
    })
</script>
<template>
    <h3>mitter-子组件Child2</h3>
    <h6>来自于Child1的数据-{{bao2||'孤苦伶仃'}}</h6>
</template>
<style scoped>
   
</style>